package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.RestaurantOrderItem;
import com.ruoyi.system.mapper.RestaurantOrderItemMapper;
import com.ruoyi.system.service.IRestaurantOrderItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 餐饮详情Service业务层处理
 * 
 * @author 强盛酒店
 * @date 2023-03-12
 */
@Service
public class RestaurantOrderItemServiceImpl implements IRestaurantOrderItemService 
{
    @Autowired
    private RestaurantOrderItemMapper restaurantOrderItemMapper;

    /**
     * 查询餐饮详情
     * 
     * @param id 餐饮详情主键
     * @return 餐饮详情
     */
    @Override
    public RestaurantOrderItem selectRestaurantOrderItemById(Long id)
    {
        return restaurantOrderItemMapper.selectRestaurantOrderItemById(id);
    }

    /**
     * 查询餐饮详情列表
     * 
     * @param restaurantOrderItem 餐饮详情
     * @return 餐饮详情
     */
    @Override
    public List<RestaurantOrderItem> selectRestaurantOrderItemList(RestaurantOrderItem restaurantOrderItem)
    {
        return restaurantOrderItemMapper.selectRestaurantOrderItemList(restaurantOrderItem);
    }

    /**
     * 新增餐饮详情
     * 
     * @param restaurantOrderItem 餐饮详情
     * @return 结果
     */
    @Override
    public int insertRestaurantOrderItem(RestaurantOrderItem restaurantOrderItem)
    {
        return restaurantOrderItemMapper.insertRestaurantOrderItem(restaurantOrderItem);
    }

    /**
     * 修改餐饮详情
     * 
     * @param restaurantOrderItem 餐饮详情
     * @return 结果
     */
    @Override
    public int updateRestaurantOrderItem(RestaurantOrderItem restaurantOrderItem)
    {
        return restaurantOrderItemMapper.updateRestaurantOrderItem(restaurantOrderItem);
    }

    /**
     * 批量删除餐饮详情
     * 
     * @param ids 需要删除的餐饮详情主键
     * @return 结果
     */
    @Override
    public int deleteRestaurantOrderItemByIds(Long[] ids)
    {
        return restaurantOrderItemMapper.deleteRestaurantOrderItemByIds(ids);
    }

    /**
     * 删除餐饮详情信息
     * 
     * @param id 餐饮详情主键
     * @return 结果
     */
    @Override
    public int deleteRestaurantOrderItemById(Long id)
    {
        return restaurantOrderItemMapper.deleteRestaurantOrderItemById(id);
    }
}
